Conventionally, at the time of reading image information of a reading object, there is known an image forming apparatus which detects a size of the reading object by two methods (first detection and second detection). The first detection is that the image forming apparatus detects the size of the reading object placed on an upper surface of a stacking tray with a first detection section. The stacking tray is a tray on which a user places the reading object at the time the image forming apparatus reads the image information of the reading object. The second detection is that the image forming apparatus detects the size of the reading object with a second detection section at the time of conveying the reading object inside the image forming apparatus.
In such an image forming apparatus, there is a case in which a first detection result which is a detection result of the first detection is not consistent with a second detection result which is a detection result of the second detection. For example, such an inconsistency occurs if the reading object is Z-folded, or if a plurality of the reading objects having different sizes is overlapped. The reason is that the image forming apparatus detects a size smaller than an actual size of the reading object in the first detection as the size of the reading object. If the first detection result is not coincident with the actual size of the reading object, the image forming apparatus cannot read the image information of the reading object correctly in some cases. As a result, the image forming apparatus determines that an error occurs and stops reading the image information of the reading object. For example, in that case, if the second detection section is provided at a position which is a position inside the image forming apparatus and satisfies a certain condition, the image forming apparatus cannot normally read the image information of the reading object. The condition is that the reading of the image information of the reading object by the image forming apparatus is started between the start and the end of the detection of the size of the reading object by the second detection section.